home *** CD-ROM | disk | FTP | other *** search
/ SGI Performance Co-Pilot 1.3 / SGI Performance Co-Pilot 1.3.iso / dist / pcp.idb / usr / share / catman / u_man / cat1 / pmcd.z.z / pmcd.z / pmcd
Text File  |  1997-04-03  |  39KB  |  727 lines

  1.  
  2.  
  3.  
  4. PPPPMMMMCCCCDDDD((((1111))))                                                                PPPPMMMMCCCCDDDD((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ppppmmmmccccdddd - performance metrics collector daemon
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ppppmmmmccccdddd [----ffff] [----iiii _i_p_a_d_d_r_e_s_s] [----llll _l_o_g_f_i_l_e] [----tttt _t_i_m_e_o_u_t] [----TTTT _m_a_s_k]
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      ppppmmmmccccdddd is the collector used by the Performance Co-Pilot (PCP) to gather
  16.      performance metrics on a system.  As a rule, there must be an instance of
  17.      ppppmmmmccccdddd running on a system for any performance metrics to be available to
  18.      the PCP.
  19.  
  20.      ppppmmmmccccdddd accepts connections from client applications running either on the
  21.      same machine or remotely and provides them with metrics and other related
  22.      information from the machine that ppppmmmmccccdddd is executing on.  ppppmmmmccccdddd delegates
  23.      most of this request servicing to a collection of Performance Metrics
  24.      Domain Agents (PMDAs, or just agents), where each agent is responsible
  25.      for a particular group of metrics, known as the domain of the agent.  For
  26.      example the eeeennnnvvvviiiirrrroooonnnn agent is responsible for reporting information
  27.      relating to the environment of a Challenge system, such as the cabinet
  28.      temperature and voltage levels of the power supply.
  29.  
  30.      The agents may be processes started by ppppmmmmccccdddd, independent processes or
  31.      Dynamic Shared Objects (DSOs, see ddddssssoooo(5)) attached to ppppmmmmccccdddd's address
  32.      space.  The configuration section below describes how connections to
  33.      agents are specified.
  34.  
  35.      The options to ppppmmmmccccdddd are as follows.
  36.  
  37.      ----ffff   By default ppppmmmmccccdddd is started as a daemon.  The ----ffff option indicates
  38.           that it should run in the foreground.  This is most useful when
  39.           trying to diagnose problems with misbehaving agents.
  40.  
  41.      ----iiii _i_p_a_d_d_r_e_s_s
  42.           This option is usually only used on hosts with more than one network
  43.           interface.  If no ----iiii options are specified ppppmmmmccccdddd accepts connections
  44.           made to any of its host's IP (Internet Protocol) addresses.  The ----iiii
  45.           option is used to specify explicitly an IP address that connections
  46.           should be accepted on.  _i_p_a_d_d_r_e_s_s should be in the standard dotted
  47.           form (e.g. 100.23.45.6).  The ----iiii option may be used multiple times
  48.           to define a list of IP addresses.  Connections made to any other IP
  49.           addresses the host has will be refused.  This can be used to limit
  50.           connections to one network interface if the host is a network
  51.           gateway.  It is also useful if the host takes over the IP address of
  52.           another host that has failed.  In such a situation only the standard
  53.           IP addresses of the host should be given (not the ones inherited
  54.           from the failed host).  This is allows PCP applications to determine
  55.           that a host has failed, rather than connecting to the host that has
  56.           assumed the identity of the failed host.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. PPPPMMMMCCCCDDDD((((1111))))                                                                PPPPMMMMCCCCDDDD((((1111))))
  71.  
  72.  
  73.  
  74.      ----llll _l_o_g_f_i_l_e
  75.           By default a log file named _p_m_c_d._l_o_g is written in the directory
  76.           /_v_a_r/_a_d_m/_p_c_p_l_o_g (else the directory identified by the PPPPCCCCPPPP____LLLLOOOOGGGGDDDDIIIIRRRR
  77.           environment variable).  The ----llll option causes the log file to be
  78.           written to _l_o_g_f_i_l_e instead of the default.  If the log file cannot
  79.           be created or is not writable, output is written to the standard
  80.           error instead.  The ----llll option specifies an alternative name for the
  81.           log file.
  82.  
  83.      ----tttt _t_i_m_e_o_u_t
  84.           To prevent misbehaving agents from hanging the entire Performance
  85.           Metrics Collection System (PMCS), ppppmmmmccccdddd uses timeouts on PDU
  86.           exchanges with agents running as processes.  By default the timeout
  87.           interval is five seconds.  The ----tttt option allows an alternative
  88.           timeout interval in seconds to be specified.  If _t_i_m_e_o_u_t is zero,
  89.           timeouts are turned off.  It is almost impossible to use the
  90.           debugger interactively on an agent unless timeouts have been turned
  91.           off for its "parent" ppppmmmmccccdddd.
  92.  
  93.           Once ppppmmmmccccdddd is running, the timeout may be dynamically modified by
  94.           storing an integer value (the timeout in seconds) into the metric
  95.           ppppmmmmccccdddd....ccccoooonnnnttttrrrroooollll....ttttiiiimmmmeeeeoooouuuutttt via ppppmmmmssssttttoooorrrreeee(1).
  96.  
  97.      ----TTTT _m_a_s_k
  98.           To assist with error diagnosis for agents and/or clients of ppppmmmmccccdddd
  99.           that are not behaving correctly, an internal event tracing mechanism
  100.           is supported within ppppmmmmccccdddd.  The ----TTTT flag may be used to selectively
  101.           enable connection tracing and/or PDU tracing (_m_a_s_k bits 1 and 2
  102.           respectively).
  103.  
  104.           Event tracing uses a circular buffer that is over-written as new
  105.           events are recorded.  The default buffer size holds the last 20
  106.           events, although this number may be over-ridden by using ppppmmmmssssttttoooorrrreeee(1)
  107.           to modify the metric ppppmmmmccccdddd....ccccoooonnnnttttrrrroooollll....ttttrrrraaaacccceeeebbbbuuuuffffssss.
  108.  
  109.           Similarly once ppppmmmmccccdddd is running, the event tracing mask may be
  110.           dynamically modified by storing 1 (enable) or 0 (disable) into the
  111.           metrics ppppmmmmccccdddd....ccccoooonnnnttttrrrroooollll....ttttrrrraaaacccceeeeccccoooonnnnnnnn and ppppmmmmccccdddd....ccccoooonnnnttttrrrroooollll....ttttrrrraaaacccceeeeppppdddduuuu.
  112.  
  113.           The event trace buffer will be dumped whenever an agent connection
  114.           is terminated by ppppmmmmccccdddd, or when any value is stored into the metric
  115.           ppppmmmmccccdddd....ccccoooonnnnttttrrrroooollll....dddduuuummmmppppttttrrrraaaacccceeee via ppppmmmmssssttttoooorrrreeee(1).
  116.  
  117.      If a PDU exchange with an agent times out, the agent has violated the
  118.      requirement that it delivers metrics with little or no delay.  This is
  119.      deemed a protocol failure and the agent is disconnected from ppppmmmmccccdddd.  Any
  120.      subsequent requests for information from the agent will fail with a
  121.      status indicating that there is no agent to provide it.
  122.  
  123.      It is possible to specify host-level access control to ppppmmmmccccdddd.  This allows
  124.      one to prevent users from certain hosts from accessing the metrics
  125.      provided by ppppmmmmccccdddd and is described in more detail in the Section on ACCESS
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. PPPPMMMMCCCCDDDD((((1111))))                                                                PPPPMMMMCCCCDDDD((((1111))))
  137.  
  138.  
  139.  
  140.      CONTROL below.
  141.  
  142. CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRAAAATTTTIIIIOOOONNNN
  143.      On startup ppppmmmmccccdddd looks for a configuration file named /_e_t_c/_p_m_c_d._c_o_n_f.
  144.      This file specifies which agents cover which performance metrics domains
  145.      and how ppppmmmmccccdddd should make contact with the agents.  An optional section
  146.      specifying host-based access controls may follow the agent configuration
  147.      data.
  148.  
  149.      WWWWaaaarrrrnnnniiiinnnngggg:  ppppmmmmccccdddd is usually started as part of the boot sequence and runs
  150.      as root.  The configuration file may contain shell commands to create
  151.      agents, which will be executed by root.  To prevent security breaches the
  152.      configuration file should be writable only by root.  The use of absolute
  153.      path names is also recommended.
  154.  
  155.      The case of the reserved words in the configuration file is unimportant,
  156.      but elsewhere, the case is preserved.
  157.  
  158.      Blank lines and comments are permitted (even encouraged) in the
  159.      configuration file.  A comment begins with a ``#'' character and finishes
  160.      at the end of the line.  A line may be continued by ensuring that the
  161.      last character on the line is a ``\'' (backslash).  A comment on a
  162.      continued line ends at the end of the continued line.  Spaces may be
  163.      included in lexical elements by enclosing the entire element in double
  164.      quotes (there must be whitespace before the opening and after the closing
  165.      quote).  A double quote preceded by a backslash is always a literal
  166.      double quote.  A ``#'' in double quotes or preceded by a backslash is
  167.      treated literally rather than as a comment delimiter.  Lexical elements
  168.      and separators are described further in the following sections.
  169.  
  170. AAAAGGGGEEEENNNNTTTT CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRAAAATTTTIIIIOOOONNNN
  171.      Each line of the agent configuration section of the configuration file
  172.      contains details of how to connect ppppmmmmccccdddd to one of its agents and
  173.      specifies which metrics domain the agent deals with.  An agent may be
  174.      attached as a DSO, or via a socket, or a pair of pipes.
  175.  
  176.      Each line of the agent configuration section of the configuration file
  177.      must be either an agent specification, a comment, or a blank line.
  178.      Lexical elements are separated by whitespace characters, however a single
  179.      agent specification may not be broken across lines unless a \\\\ (backslash)
  180.      is used to continue the line.
  181.  
  182.      Each agent specification must start with a textual label (string)
  183.      followed by an integer in the range 0 to 254.  The label is a tag used to
  184.      refer to the agent and the integer specifies the domain for which the
  185.      agent supplies data.  This domain identifier corresponds to the domain
  186.      portion of the PMIDs handled by the agent.  Each agent must have a unique
  187.      label and domain identifier.
  188.  
  189.      For DSO agents a line of the form:
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. PPPPMMMMCCCCDDDD((((1111))))                                                                PPPPMMMMCCCCDDDD((((1111))))
  203.  
  204.  
  205.  
  206.           _l_a_b_e_l _d_o_m_a_i_n-_n_o ddddssssoooo _e_n_t_r_y-_p_o_i_n_t _p_a_t_h
  207.  
  208.      should appear.  Where,
  209.  
  210.      _l_a_b_e_l         is a string identifying the agent
  211.      _d_o_m_a_i_n-_n_o     is an unsigned integer specifying the agent's domain
  212.      _e_n_t_r_y-_p_o_i_n_t   is the name of an initialisation function which will be
  213.                    called when the DSO is loaded
  214.      _p_a_t_h          designates the location of the DSO.  If _p_a_t_h begins with a
  215.                    //// it is taken as an absolute path specifying the DSO.  If
  216.                    _p_a_t_h is relative, ppppmmmmccccdddd will expect to find the agent in a
  217.                    file with the name mmmmiiiippppssss_____s_i_m_a_b_i...._p_a_t_h, where _s_i_m_a_b_i is either
  218.                    oooo33332222, nnnn33332222 or 66664444.  ppppmmmmccccdddd is only able to load DSO agents that
  219.                    have the same _s_i_m_a_b_i (Subprogram Interface Model ABI, or
  220.                    calling conventions) as it does (i.e. only one of the
  221.                    _s_i_m_a_b_i versions will be applicable).  The _s_i_m_a_b_i version of
  222.                    a running ppppmmmmccccdddd may be determined by fetching ppppmmmmccccdddd....ssssiiiimmmmaaaabbbbiiii.
  223.                    Alternatively, the ffffiiiilllleeee(1) command may be used to determine
  224.                    the _s_i_m_a_b_i version from the ppppmmmmccccdddd executable.
  225.  
  226.      For a relative _p_a_t_h the environment variable PPPPMMMMCCCCDDDD____PPPPAAAATTTTHHHH defines a a colon
  227.      (:) separated list of directories to search when trying to locate the
  228.      agent DSO.  The default search path is ``/var/pcp/lib:/usr/pcp/lib''.
  229.  
  230.      For agents providing socket connections, a line of the form
  231.  
  232.           _l_a_b_e_l _d_o_m_a_i_n-_n_o ssssoooocccckkkkeeeetttt _a_d_d_r-_f_a_m_i_l_y _a_d_d_r_e_s_s [ _c_o_m_m_a_n_d ]
  233.  
  234.      should appear.  Where,
  235.  
  236.      _l_a_b_e_l         is a string identifying the agent
  237.      _d_o_m_a_i_n-_n_o     is an unsigned integer specifying the agent's domain
  238.      _a_d_d_r-_f_a_m_i_l_y   designates whether the socket is in the AAAAFFFF____IIIINNNNEEEETTTT or AAAAFFFF____UUUUNNNNIIIIXXXX
  239.                    domain, and the corresponding values for this parameter are
  240.                    iiiinnnneeeetttt and uuuunnnniiiixxxx respectively.
  241.      _a_d_d_r_e_s_s       specifies the address of the socket within the previously
  242.                    specified _a_d_d_r-_f_a_m_i_l_y. For uuuunnnniiiixxxx sockets, the address should
  243.                    be the name of an agent's socket on the local host (a valid
  244.                    address for the UNIX domain).  For iiiinnnneeeetttt sockets, the
  245.                    address may be either a port number or a port name which
  246.                    may be used to connect to an agent on the local host.
  247.                    There is no syntax for specifying an agent on a remote host
  248.                    as a ppppmmmmccccdddd deals only with agents on the same machine.
  249.      _c_o_m_m_a_n_d       is an optional parameter used to specify a command line to
  250.                    start the agent when ppppmmmmccccdddd initialises.  If _c_o_m_m_a_n_d is not
  251.                    present, ppppmmmmccccdddd assumes that the specified agent has already
  252.                    been created.  The _c_o_m_m_a_n_d is considered to start from the
  253.                    first non-white character after the socket address and
  254.                    finish at the next newline that isn't preceded by a
  255.                    backslash.  After a ffffoooorrrrkkkk(2) the _c_o_m_m_a_n_d is passed
  256.                    unmodified to eeeexxxxeeeeccccvvvveeee(2) to instantiate the agent.
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. PPPPMMMMCCCCDDDD((((1111))))                                                                PPPPMMMMCCCCDDDD((((1111))))
  269.  
  270.  
  271.  
  272.      For agents interacting with the ppppmmmmccccdddd via stdin/stdout, a line of the
  273.      form:
  274.  
  275.           _l_a_b_e_l _d_o_m_a_i_n-_n_o ppppiiiippppeeee _p_r_o_t_o_c_o_l _c_o_m_m_a_n_d
  276.  
  277.      should appear.  Where,
  278.  
  279.      _l_a_b_e_l         is a string identifying the agent
  280.      _d_o_m_a_i_n-_n_o     is a unsigned integer specifying the agent's domain
  281.      _p_r_o_t_o_c_o_l      specifies whether a text-based or a binary protocol should
  282.                    be used over the pipes.  The two valid values for this
  283.                    parameter are tttteeeexxxxtttt and bbbbiiiinnnnaaaarrrryyyy.
  284.      _c_o_m_m_a_n_d       specifies a command line to start the agent when ppppmmmmccccdddd
  285.                    initialises.  Note that _c_o_m_m_a_n_d is mandatory for pipe-based
  286.                    agents.  The _c_o_m_m_a_n_d is considered to start from the first
  287.                    non-white character after the _p_r_o_t_o_c_o_l parameter and finish
  288.                    at the next newline that isn't preceded by a backslash.
  289.                    After a ffffoooorrrrkkkk(2) the _c_o_m_m_a_n_d is passed unmodified to
  290.                    eeeexxxxeeeeccccvvvveeee(2) to instantiate the agent.
  291.  
  292. AAAACCCCCCCCEEEESSSSSSSS CCCCOOOONNNNTTTTRRRROOOOLLLL CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRAAAATTTTIIIIOOOONNNN
  293.      The access control section of the configuration file is optional, but if
  294.      present it must follow the agent configuration data.  The case of
  295.      reserved words is ignored, but elsewhere case is preserved.  Lexical
  296.      elements in the access control section are separated by whitespace or the
  297.      special delimiter characters:  square brackets (``['' and ``]''), braces
  298.      (``{'' and ``}''), colon (``:''), semicolon (``;'') and comma (``,'').
  299.      The special characters are not treated as special in the agent
  300.      configuration section.
  301.  
  302.      The access control section of the file must start with a line of the
  303.      form:
  304.  
  305.      [[[[aaaacccccccceeeessssssss]]]]
  306.  
  307.      Leading and trailing whitespace may appear around and within the brackets
  308.      and the case of the aaaacccccccceeeessssssss keyword is ignored.  No other text may appear
  309.      on the line except a trailing comment.
  310.  
  311.      Following this line, the remainder of the configuration file should
  312.      contain lines that allow or disallow operations from particular hosts or
  313.      groups of hosts.
  314.  
  315.      There are two kinds of operations that occur via ppppmmmmccccdddd:
  316.  
  317.      ffffeeeettttcccchhhh          allows retrieval of information from ppppmmmmccccdddd.  This may be
  318.                     information about a metric (e.g. it's description,
  319.                     instance domain or help text) or a value for a metric.
  320.  
  321.      ssssttttoooorrrreeee          allows ppppmmmmccccdddd to be used to store metric values in agents
  322.                     that permit store operations.
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. PPPPMMMMCCCCDDDD((((1111))))                                                                PPPPMMMMCCCCDDDD((((1111))))
  335.  
  336.  
  337.  
  338.      Access to ppppmmmmccccdddd is granted at the host level, i.e. all users on a host are
  339.      granted the same level of access.  Permission to perform the ssssttttoooorrrreeee
  340.      operation should not be given indiscriminately; it has the potential to
  341.      be abused by malicious users.
  342.  
  343.      Hosts may be identified by name, IP address or a wildcarded IP address
  344.      with the single wildcard character ``*'' as the last-given component if
  345.      the IP address.  Host names may not be wildcarded.  The following are all
  346.      valid host identifiers:
  347.  
  348.           boing
  349.           localhost
  350.           giggle.melbourne.sgi.com
  351.           129.127.112.2
  352.           129.127.114.*
  353.           129.*
  354.           *
  355.  
  356.      The following are not valid host identifiers:
  357.  
  358.           *.melbourne
  359.           129.127.*.*
  360.           129.*.114.9
  361.           129.127*
  362.  
  363.      The first example is not allowed because only (numeric) IP addresses may
  364.      contain a wildcard.  The second example is not valid because there is
  365.      more than one wildcard character.  The third contains an embedded
  366.      wildcard and the fourth has a wildcard character that not the last
  367.      component of the IP address (the last component is 127*).
  368.  
  369.      The name llllooooccccaaaallllhhhhoooosssstttt is given special treatment to make the behaviour of
  370.      host wildcarding consistent.  Rather than being 127.0.0.1, it is mapped
  371.      to the primary IP address associated with the name of the host on which
  372.      ppppmmmmccccdddd is running.  Beware of this when running ppppmmmmccccdddd on multi-homed hosts.
  373.  
  374.      Access for hosts are allowed or disallowed by specifying statements of
  375.      the form:
  376.  
  377.           aaaalllllllloooowwww _h_o_s_t_l_i_s_t :::: _o_p_e_r_a_t_i_o_n_s ;;;;
  378.           ddddiiiissssaaaalllllllloooowwww _h_o_s_t_l_i_s_t :::: _o_p_e_r_a_t_i_o_n_s ;;;;
  379.  
  380.      _h_o_s_t_l_i_s_t      is a comma separated list of host identifiers.
  381.  
  382.      _o_p_e_r_a_t_i_o_n_s    is a comma separated list of the operation types described
  383.                    above, aaaallllllll (which allows/disallows all operations), or aaaallllllll
  384.                    eeeexxxxcccceeeepppptttt _o_p_e_r_a_t_i_o_n_s (which allows/disallows all operations
  385.                    except those listed).
  386.  
  387.      Where no specific aaaalllllllloooowwww or ddddiiiissssaaaalllllllloooowwww statement applies to an operation for
  388.      some host, the default is to allow the operation from that host.  In the
  389.      trivial case when there is no access control section in the configuration
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. PPPPMMMMCCCCDDDD((((1111))))                                                                PPPPMMMMCCCCDDDD((((1111))))
  401.  
  402.  
  403.  
  404.      file, all operations from all hosts are permitted.
  405.  
  406.      If a new connection to ppppmmmmccccdddd is attempted from a host that is not
  407.      permitted to perform any operations, the connection will be closed
  408.      immediately after an error response PPPPMMMM____EEEERRRRRRRR____PPPPEEEERRRRMMMMIIIISSSSSSSSIIIIOOOONNNN has been sent to
  409.      the client attempting the connection.
  410.  
  411.      Statements with the same level of wildcarding specifying identical hosts
  412.      may not contradict each other.  For example if a host named ccccllllaaaannnnkkkk had an
  413.      IP address of 129.127.112.2, specifying the following two rules would be
  414.      erroneous:
  415.  
  416.           allow clank : fetch, store;
  417.           disallow 129.127.112.2 : all except fetch;
  418.  
  419.      because they both refer to the same host, but disagree as to whether the
  420.      ffffeeeettttcccchhhh operation is permitted from that host.
  421.  
  422.      Statements containing more specific host specifications override less
  423.      specific ones according to the level of wildcarding.  For example a rule
  424.      of the form
  425.  
  426.           allow clank : all;
  427.  
  428.      overrides
  429.  
  430.           disallow 129.127.112.* : all except fetch;
  431.  
  432.      because the former contains a specific host name (equivalent to a fully
  433.      specified IP address), whereas the latter has a wildcard.  In turn, the
  434.      latter would override
  435.  
  436.           disallow * : all;
  437.  
  438.      It is possible to limit the number of connections from a host to ppppmmmmccccdddd.
  439.      This may be done by adding a clause of the form
  440.  
  441.           mmmmaaaaxxxxiiiimmmmuuuummmm _n ccccoooonnnnnnnneeeeccccttttiiiioooonnnnssss
  442.  
  443.      to the _o_p_e_r_a_t_i_o_n_s list of an aaaalllllllloooowwww statement.  Such a clause may not be
  444.      used in a ddddiiiissssaaaalllllllloooowwww statement.  Here, _n is the maximum number of
  445.      connections that will be accepted from hosts matching the host
  446.      identifier(s) used in the statement.
  447.  
  448.      An access control statement with a list of host identifiers is equivalent
  449.      to a group of access control statements, with each specifying one of the
  450.      host identifiers in the list and all with the same access controls (both
  451.      permissions and connection limits).  A wildcard should be used if you
  452.      want hosts to contribute to a shared connection limit.
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. PPPPMMMMCCCCDDDD((((1111))))                                                                PPPPMMMMCCCCDDDD((((1111))))
  467.  
  468.  
  469.  
  470.      When a new client requests a connection, and ppppmmmmccccdddd has determined that the
  471.      client has permission to connect, it searches the matching list of access
  472.      control statements for the most specific match containing a connection
  473.      limit.  For brevity, this will be called the limiting statement.  If
  474.      there is no limiting statement, the client is granted a connection.  If
  475.      there is a limiting statement and the number of ppppmmmmccccdddd clients with IP
  476.      addresses that match the host identifier in the limiting statement is
  477.      less than the connection limit in the statement, the connection is
  478.      allowed.  Otherwise the connection limit has been reached and the client
  479.      is refused a connection.
  480.  
  481.      The wildcarding in host identifiers means that once ppppmmmmccccdddd actually accepts
  482.      a connection from a client, the connection may contribute to the current
  483.      connection count of more than one access control statement (the client's
  484.      host may match more than one access control statement).  This may be
  485.      significant for subsequent connection requests.
  486.  
  487.      Note that because most specific match semantics are used when checking
  488.      the connection limit, priority is given to clients with more specific
  489.      host identifiers.  It is also possible to exceed connection limits in
  490.      some situations.  Consider the following:
  491.  
  492.           allow clank : all, maximum 5 connections;
  493.           allow * : all except store, maximum 2 connections;
  494.  
  495.      This says that only 2 client connections at a time are permitted for all
  496.      hosts other than "clank", which is permitted 5.  If a client from host
  497.      "boing" is the first to connect to ppppmmmmccccdddd, it's connection is checked
  498.      against the second statement (that is the most specific match with a
  499.      connection limit).  As there are no other clients, the connection is
  500.      accepted and contributes towards the limit for only the second statement
  501.      above.  If the next client connects from "clank", its connection is
  502.      checked against the limit for the first statement.  There are no other
  503.      connections from "clank", so the connection is accepted.  Once this
  504.      connection is accepted, it counts towards bbbbooootttthhhh statements' limits because
  505.      "clank" matches the host identifier in both statements.  Remember that
  506.      the decision to accept a new connection is made using only the most
  507.      specific matching access control statement with a connection limit.  Now,
  508.      the connection limit for the second statement has been reached.  Any
  509.      connections from hosts other than "clank" will be refused.
  510.  
  511.      If instead, ppppmmmmccccdddd with no clients saw three successive connections arrived
  512.      from "boing", the first two would be accepted and the third refused.
  513.      After that, if a connection was requested from "clank" it would be
  514.      accepted.  It matches the first statement, which is more specific than
  515.      the second, so the connection limit in the first is used to determine
  516.      that the client has the right to connect.  Now there are 3 connections
  517.      contributing to the second statement's connection limit.  Even though the
  518.      connection limit for the second statement has been exceeded, the earlier
  519.      connections from "boing" are maintained.  The connection limit is only
  520.      checked at the time a client attempts a connection rather than being re-
  521.      evaluated every time a new client connects to ppppmmmmccccdddd.
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. PPPPMMMMCCCCDDDD((((1111))))                                                                PPPPMMMMCCCCDDDD((((1111))))
  533.  
  534.  
  535.  
  536.      This scheme is a gentle one designed to allow reasonable limits to be
  537.      imposed on a first come first served basis, with specific exceptions.
  538.  
  539.      As illustrated by the example above, a client's connection is honoured
  540.      once it has been accepted.  However, ppppmmmmccccdddd reconfiguration (see the next
  541.      section) re-evaluates all the connection counts and will cause client
  542.      connections to be dropped where connection limits have been exceeded.
  543.  
  544. RRRREEEECCCCOOOONNNNFFFFIIIIGGGGUUUURRRRIIIINNNNGGGG PPPPMMMMCCCCDDDD
  545.      If the configuration file has been changed or if an agent is not
  546.      responding because it has terminated ppppmmmmccccdddd may be reconfigured by sending
  547.      it a SIGHUP, as in
  548.  
  549.           # killall -HUP pmcd
  550.  
  551.      When ppppmmmmccccdddd receives a SIGHUP, it checks the configuration file for
  552.      changes.  If the file has been modified, it is reparsed and the contents
  553.      become the new configuration.  If there are errors in the configuration
  554.      file, the existing configuration is retained and the contents of the file
  555.      are ignored.  Use of ttttaaaaiiiillll(1) on the log file is recommended while
  556.      reconfiguring ppppmmmmccccdddd.
  557.  
  558.      If the configuration for an agent has changed (any parameter except the
  559.      agent's label is different), the agent is restarted.  Agents whose
  560.      configurations do not change are not restarted.  Any existing agents not
  561.      present in the new configuration are terminated.  Any deceased agents are
  562.      restarted.
  563.  
  564.      Sometimes it is necessary to restart an agent that is still running, but
  565.      malfunctioning.  Simply kill the agent, then send ppppmmmmccccdddd a SIGHUP, which
  566.      will cause the agent to be restarted.
  567.  
  568. SSSSTTTTAAAARRRRTTTTIIIINNNNGGGG AAAANNNNDDDD SSSSTTTTOOOOPPPPPPPPIIIINNNNGGGG PPPPMMMMCCCCDDDD
  569.      Normally, ppppmmmmccccdddd is started automatically at boot time and stopped when the
  570.      system is being brought down (see rrrrcccc2222(1M) and rrrrcccc0000(1M)).  Under certain
  571.      circumstances it is necessary to start or stop ppppmmmmccccdddd manually.  To do this
  572.      one must become superuser and type
  573.  
  574.           # /etc/init.d/pcp start
  575.  
  576.      to start ppppmmmmccccdddd, or
  577.  
  578.           # /etc/init.d/pcp stop
  579.  
  580.      to stop ppppmmmmccccdddd.  Starting ppppmmmmccccdddd when it is already running is the same as
  581.      stopping it and then starting it again.
  582.  
  583.      Sometimes it may be necessary to restart ppppmmmmccccdddd during another phase of the
  584.      boot process.  Time-consuming parts of the boot process are often put
  585.      into the background to allow the system to become available sooner (e.g.
  586.      mounting huge databases).  If an agent run by ppppmmmmccccdddd requires such a task
  587.      to complete before it can run properly, it is necessary to restart or
  588.  
  589.  
  590.  
  591.                                                                         PPPPaaaaggggeeee 9999
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. PPPPMMMMCCCCDDDD((((1111))))                                                                PPPPMMMMCCCCDDDD((((1111))))
  599.  
  600.  
  601.  
  602.      reconfigure ppppmmmmccccdddd after the task completes.  Consider, for example, the
  603.      case of mounting a database in the background while booting.  If the PMDA
  604.      which provides the metrics about the database cannot function until the
  605.      database is mounted and available but ppppmmmmccccdddd is started before the database
  606.      is ready, the PMDA will fail (however ppppmmmmccccdddd will still service requests
  607.      for metrics from other domains).  If the database is initialised by
  608.      running a shell script, adding a line to the end of the script to
  609.      reconfigure ppppmmmmccccdddd (by sending it a SIGHUP) will restart the PMDA (if it
  610.      exited because it couldn't connect to the database).  If the PMDA didn't
  611.      exit in such a situation it would be necessary to restart ppppmmmmccccdddd because if
  612.      the PMDA was still running ppppmmmmccccdddd would not restart it.
  613.  
  614.      Normally ppppmmmmccccdddd listens for client connections on TCP/IP port number 4321.
  615.      The environment variable PPPPMMMMCCCCDDDD____PPPPOOOORRRRTTTT may be used to specify an alternative
  616.      port number.  If PPPPMMMMCCCCDDDD____PPPPOOOORRRRTTTT is used, care should be taken to ensure the
  617.      environment variable is set before ppppmmmmccccdddd is started, and also in the
  618.      environment of any client application that will connect to ppppmmmmccccdddd.
  619.  
  620. FFFFIIIILLLLEEEESSSS
  621.      /_e_t_c/_p_m_c_d._c_o_n_f      default configuration file
  622.      /_e_t_c/_c_o_n_f_i_g/_p_m_c_d    cccchhhhkkkkccccoooonnnnffffiiiigggg(1M) control flag, to control launching of
  623.                          ppppmmmmccccdddd from ////eeeettttcccc////iiiinnnniiiitttt....dddd////ppppccccpppp
  624.      /_e_t_c/_c_o_n_f_i_g/_p_m_c_d._o_p_t_i_o_n_s
  625.                          command line options to ppppmmmmccccdddd when launched from
  626.                          ////eeeettttcccc////iiiinnnniiiitttt....dddd////ppppccccpppp
  627.      ./_p_m_c_d._l_o_g          (or $$$${{{{PPPPCCCCPPPP____LLLLOOOOGGGGDDDDIIIIRRRR----////vvvvaaaarrrr////aaaaddddmmmm////ppppccccpppplllloooogggg}}}}////ppppmmmmccccdddd....lllloooogggg when
  628.                          started automatically)
  629.                          All messages and diagnostics are directed here
  630.  
  631. EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
  632.      PPPPMMMMCCCCDDDD____PPPPOOOORRRRTTTT
  633.           TCP/IP port for incoming connections, defaults to 4321.
  634.  
  635. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  636.      ppppmmmmddddbbbbgggg(1), ppppmmmmeeeerrrrrrrr(1), ppppmmmmggggeeeennnnmmmmaaaapppp(1), ppppmmmmiiiinnnnffffoooo(1), ppppmmmmkkkkssssttttaaaatttt(1), ppppmmmmssssttttoooorrrreeee(1),
  637.      ppppmmmmvvvvaaaallll(1), ppppmmmmvvvvccccrrrr(1), PPPPMMMMAAAAPPPPIIII(3) and ddddssssoooo(5).
  638.  
  639. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  640.      If ppppmmmmccccdddd is already running the message "Error: OpenRequestSocket bind:
  641.      Address already in use" will appear.  This may also appear if ppppmmmmccccdddd was
  642.      shutdown with an outstanding request from a client.  In this case, a
  643.      request socket has been left in the TIME_WAIT state and until the system
  644.      closes it down (after some timeout period) it will not be possible to run
  645.      ppppmmmmccccdddd.
  646.  
  647.      In addition to the standard PPPPCCCCPPPP debugging flags, see ppppmmmmddddbbbbgggg(1), ppppmmmmccccdddd
  648.      currently uses DDDDBBBBGGGG____TTTTRRRRAAAACCCCEEEE____AAAAPPPPPPPPLLLL0000 for tracing I/O and termination of agents,
  649.      DDDDBBBBGGGG____TTTTRRRRAAAACCCCEEEE____AAAAPPPPPPPPLLLL1111 for tracing host access control (see below) and
  650.      DDDDBBBBGGGG____TTTTRRRRAAAACCCCEEEE____AAAAPPPPPPPPLLLL2222 for tracing the configuration file scanner and parser.
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.                                                                        PPPPaaaaggggeeee 11110000
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. PPPPMMMMCCCCDDDD((((1111))))                                                                PPPPMMMMCCCCDDDD((((1111))))
  665.  
  666.  
  667.  
  668. CCCCAAAAVVVVEEEEAAAATTTTSSSS
  669.      ppppmmmmccccdddd does not kill its child agents, it only closes their pipes.  If an
  670.      agent never checks for a closed pipe it may not terminate.
  671.  
  672.      The configuration file parser will only read lines of less than 1200
  673.      characters.  This is intended to prevent accidents with binary files.
  674.  
  675.      The timeouts controlled by the ----tttt option apply to IPC between ppppmmmmccccdddd and
  676.      the PMDAs it spawns.  This is independent of settings of the environment
  677.      variables PPPPMMMMCCCCDDDD____CCCCOOOONNNNNNNNEEEECCCCTTTT____TTTTIIIIMMMMEEEEOOOOUUUUTTTT and PPPPMMMMCCCCDDDD____RRRREEEEQQQQUUUUEEEESSSSTTTT____TTTTIIIIMMMMEEEEOOOOUUUUTTTT (see PPPPMMMMAAAAPPPPIIII(3))
  678.      which may be used respectively to control timeouts for client
  679.      applications trying to connect to ppppmmmmccccdddd and trying to receive information
  680.      from ppppmmmmccccdddd.
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.                                                                        PPPPaaaaggggeeee 11111111
  724.  
  725.  
  726.  
  727.